<template>
 <div>
   <avue-crud :data="data" :option="option" ref="crud"></avue-crud>
   <el-button @click="reset">清空</el-button>
 </div>
</template>
<script>
export default {
  data() {
    return {
      data: [
        {
          name:'张三',
          sex:'男'
        }, {
          name:'李四',
          sex:'女'
        }
      ],
      option:{
        searchLabelWidth:150,
        column:[
          {
            label:'姓名',
            prop:'name',
            searchLabelWidth:30,
            search:true,
          }, {
            label:'性别',
            prop:'sex',
            search:true,
          }
        ]
      },
    };
  },
  methods:{
    reset(){
      console.log(this.$refs.crud.searchReset())
    }
  }
}
</script>
